package com.ajz.manager.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ajz.common.web.BaseController;
import com.ajz.manager.entity.Member;
import com.ajz.manager.service.MemberService;

@Controller
@RequestMapping("/manager/mbMember")
public class MbMemberController extends BaseController<Member, String> {
//	@Autowired
//	private MemberService memberService;
//	/**
//     * 用户登录
//     *
//     * @param username 用户名
//     * @param password 密码
//     * @return 操作结果
//     * @throws AuthenticationException 错误信息
//     */
//    @PostMapping(value = "/login", params = {"username", "password"})
//    public String getToken(String username, String password) throws AuthenticationException {
//        return memberService.login(username, password);
//    }
//
//    /**
//     * 用户注册
//     *
//     * @param user          用户信息
//     * @return 操作结果
//     * @throws AuthenticationException 错误信息
//     */
//    @PostMapping(value = "/register")
//    public String register(Member user) throws AuthenticationException {
//        return memberService.register(user);
//    }
//
//    /**
//     * 刷新密钥
//     *
//     * @param authorization 原密钥
//     * @return 新密钥
//     * @throws AuthenticationException 错误信息
//     */
//    @GetMapping(value = "/refreshToken")
//    public String refreshToken(@RequestHeader String authorization) throws AuthenticationException {
//        return memberService.refreshToken(authorization);
//    }
}
